package org.exez.modules.visitor.constant;

/**
 * 推送状态
 *
 * @author dtm
 */
public enum AuthorityEnum {
    ONE_USER("admin", "1"),
    TWO_USER("二级用户", "2"),
    THREE_USER("三级用户", "3"),
    FOUR_USER("四级用户", "4")
    ;
    private String name;
    private String index;

    private AuthorityEnum(String name, String index) {
        this.name = name;
        this.index = index;
    }

    public static String getName(String index) {
        for (AuthorityEnum c : AuthorityEnum.values()) {
            if (c.getIndex().equals(index)) {
                return c.name;
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIndex() {
        return index;
    }

    public void setIndex(String index) {
        this.index = index;
    }
}
